package com.hit.demo1.service.impl;

import cn.hutool.core.util.ObjectUtil;
import com.hit.demo1.entity.FileInfo;
import com.hit.demo1.entity.Test;
import com.hit.demo1.mapper.StrMapper;
import com.hit.demo1.mapper.FileInfoMapper;
import com.hit.demo1.service.FileInfoService;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.CriteriaQuery;
import jakarta.persistence.criteria.Predicate;
import jakarta.persistence.criteria.Root;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class FileInfoServiceImpl implements FileInfoService {

    @Autowired
    public FileInfoMapper fileInfoMapper;

    @Override
    public FileInfo add(FileInfo fileInfo) {
        return fileInfoMapper.save(fileInfo);
    }

    @Override
    public FileInfo findById(Integer id) {
       return fileInfoMapper.findById(id).orElse(null);
    }
}
